import request from '@/utils/request'
//文章分类
export const useGetArtInfoService = () => request.get('/my/cate/list')
export const artEditInfoService = ({ id, cate_name, cate_alias }) => {
  return request.put('/my/cate/info', {
    id,
    cate_name,
    cate_alias
  })
}
export const artAddInfoService = ({ cate_name, cate_alias }) => {
  return request.post('/my/cate/add', {
    cate_name,
    cate_alias
  })
}

export const artDeleteInfoService = (id) => {
  return request.delete('/my/cate/del', {
    params: {
      id
    }
  })
}

//文章管理
export const artGetManageInfoService = (obj) => {
  return request.get('/my/article/list', {
    params: obj
  })
}

export const artPostManageInfoService = (data) => {
  return request.post('/my/article/add', data)
}

export const artGetArticleInfoService = (id) => {
  return request.get('/my/article/info', {
    params: {
      id
    }
  })
}
export const artEditManageInfoService = (data) => {
  return request.put('/my/article/info', data)
}
